<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>GUI Builder: GridBag Customizer</title>
<link rel="stylesheet" href="ide.css" title="Oracle BLAFDoc" type="text/css"/>
</head>

<body>
<p><a id="gui.layouts.griddesigner" name="gui.layouts.griddesigner"></a></p>
<div id="NBCSH2289"><!-- infolevel="all" infotype="General" --><a id="sthref312" name="sthref312"></a>
<h1>GUI Builder: GridBag Customizer</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>Use to visually adjust the placement and constraints of components in a GridBagLayout. It includes a property sheet for GridBag constraints, buttons for adjusting the constraints, and a rough depiction of the layout of the components. 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG2638">
<param name="text" value="<html><u>How?</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p>The GridBag customizer enables you to adjust the following constraints:</p>

<table summary="User interface elements and descriptions" dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="24%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t7">Element</th>
<th align="left" valign="bottom" id="r1c2-t7">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t7" headers="r1c1-t7">
<p>Grid X and Grid Y</p>
</td>
<td align="left" headers="r2c1-t7 r1c2-t7">Fine-tune the component's horizontal and vertical position if necessary by setting its X and Y grid positions.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t7" headers="r1c1-t7">
<p>Grid Width and Grid Height</p>
</td>
<td align="left" headers="r3c1-t7 r1c2-t7">Set Grid Width and Grid Height to specify how many grid positions are allocated for the component in each direction. Specify either:
<ul>
<li>An integer value - the number of cells the component uses, (not the number of pixels)</li>
<li>Remainder - to make the component the last one in its row or column, using all remaining horizontal or vertical space</li>
<li>Relative - to specify that the component be the next to last one in its row or column</li>
</ul>
<p>You can also adjust Grid Width and Height using the Grid Size buttons. Click the rightmost button with yellow shading to set the value to Remainder.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t7" headers="r1c1-t7">
<p>Fill</p>
</td>
<td align="left" headers="r4c1-t7 r1c2-t7">The Fill constraint enables you to choose whether the component uses all of the vertical or horizontal space (or both) that is allocated to it. Any space allocated to a component that the component does not fill is marked with blue in the right pane.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t7" headers="r1c1-t7">
<p>Internal Padding X and Y</p>
</td>
<td align="left" headers="r5c1-t7 r1c2-t7">The internal padding settings enable you to increase the horizontal and vertical dimensions of the component. You can adjust these by directly entering numbers for the properties or by using the I-Padding buttons.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t7" headers="r1c1-t7">
<p>Anchor</p>
</td>
<td align="left" headers="r6c1-t7 r1c2-t7">The Anchor constraint enables you to place the component in one of nine positions within the space allocated to it (Center, North, North-West, and so on). This setting has no effect if there is no free space remaining for the component.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t7" headers="r1c1-t7">
<p>Weight X and Weight Y</p>
</td>
<td align="left" headers="r7c1-t7 r1c2-t7">Adjust the weight settings to determine how much space a component should be given relative to other components in its row or column when the container window is resized. Generally, weight values range from zero to one. Components with larger weight values get more space allocated in their row or column when the window is resized.Components with a weight value of zero always retain their preferred size for that dimension. If all the components in a row or column have a weight of zero, any extra space goes to the outer edges of the row or column and the components stay the same size.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t7" headers="r1c1-t7">
<p>Insets</p>
</td>
<td align="left" headers="r8c1-t7 r1c2-t7">The Insets determine the minimum amount of external space on each of the four sides of the component. You can enter numbers manually or use the inset buttons. The buttons are divided into four sets that enable you to adjust the insets for each side separately, the left and right insets simultaneously, the top and bottom insets simultaneously, or all four insets simultaneously.
<p>As you change the insets, you will see the inset area marked by a yellow background in the right pane.</p>
</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<a id="NBCSH2297" name="NBCSH2297"></a>
<hr><p><b>Related Topics</b></p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG2633">
<param name="text" value="<html><u>&quot;Working with Layout Managers&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>

<!-- -->
<!-- Start Footer -->


<table summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="legal_notice.htm">
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.</a>
</td>
</tr>
</table>
<!-- -->
</body>
</html>
